enting this, but I am afraid it does not work properly, at
>> least not if there are several targets following one after another.
>>
>> Consider this example:
>>
>>
>> \setupcolumns[
>> n=2,
>> ]
>> \setuplinenumbering[
>> step=5,
&g
,
]
\def\Lab#1{%
\pagereference[#1]%
\pagereference[column:#1]%
\someline[#1]%
}
\def\Ref#1{
page \at[#1],
column
\doifelsereferencefound{column:#1}{\number\referencecolumnnumber}{},
line \inlinerange[#1].
}
\starttext
\startcolumns
\startlinenumbering
REFERENCES:\par
A: \Ref{A}\par
B: \Ref{B}\par
C
\at[#1],
column \doifelsereferencefound{column:#1}{\number\referencecolumnnumber}{},
line \inlinerange[#1].
}
\starttext
\startcolumns
\startlinenumbering
REFERENCES:\par
A: \Ref{A}\par
B: \Ref{B}\par
C: \Ref{C}\par
D: \Ref{D}\par
E: \Ref{E}\par
F: \Ref{F}\par
\input lorem
TARGETS:
\Lab{A} A,
\Lab{B
it to automatically add the word
"line" or something else before the number, otherwise I have to use
\inlinerange. It took me some time to find that out. Wouldn't it be
easier to have just one command for the target and another one for
the reference, and everything else, as counters a
to a page, I need \pagereference (for the target) and \at (for the reference); to refer
to a line, I need \someline (for the target) and \inline (for the reference), but only if
I want it to automatically add the word "line" or something else before the
number, otherwise I have to use \i
ine, I need \someline (for the
>> target) and \inline (for the reference), but only if I want it to
>> automatically add the word "line" or something else before the number,
>> otherwise I have to use \inlinerange. It took me some time to find that out.
>> Wouldn'
On 9/4/2019 7:37 PM, Oliver von Criegern wrote:
Dear list members,
I want to process cross-references in ConTeXt/LuaTeX, that is, to do
some calculations in Lua with the page and line numbers returned by the
\at and \inlinerange commands.
But this does not work, as these commands
Dear list members,
I want to process cross-references in ConTeXt/LuaTeX, that is, to do
some calculations in Lua with the page and line numbers returned by the
\at and \inlinerange commands.
But this does not work, as these commands are obviously not being
expanded before they are passed
need \someline (for the target) and \inline (for the
reference), but only if I want it to automatically add the word "line"
or something else before the number, otherwise I have to use
\inlinerange. It took me some time to find that out. Wouldn't it be
easier to have just one command for
it to automatically add the word "line" or something else before
the number, otherwise I have to use \inlinerange. It took me some time
to find that out. Wouldn't it be easier to have just one command for the
target and another one for the reference, and everything else, as
counters a
and refer to it later in text: \someline[tag]; refer
back with \inline[tag] or \inlinerange[tag] (the former has a spurious
space before the number). The low-level backreferences are
\in[lr:b:tag] and \in[lr:e:tag]; see page-lin.mkiv
(d) ditto for line ranges: \startlines[tag] ... \stoplines[tag]; refer
with \setuplabeltext but you can see
alternative texts with \inline{...}[ref].
\setuptyping[numbering=line,escape=yes]
\starttext
See \inline[line:single] and also \inline[line:range].
See \inline{typeline}[line:single] and also \inline{typelines}[line:range].
See line~\inlinerange[line:single
://wiki.contextgarden.net/Reference/en/startline
http://wiki.contextgarden.net/Reference/en/inlinerange
I hope that helps others.
Best wishes,
Stefan
___
If your question is of interest to others as well, please add
].
\setuptyping[numbering=line,escape=yes]
\starttext
See \inline[line:single] and also \inline[line:range].
See \inline{typeline}[line:single] and also \inline{typelines}[line:range].
See line~\inlinerange[line:single] and also lines~\inlinerange[line:range].
\starttyping
line 1
line 2/BTEX
14 matches
Mail list logo